package control;

import java.io.IOException;

import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.StrictMode;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.example.bettertogether.R;

public class Login extends Activity {
	public static HttpClient httpclient = new DefaultHttpClient();

	public void Login(View viev) throws ClientProtocolException, IOException {
		EditText emailtext = (EditText) findViewById(R.id.emailtext);
		EditText passwordtext = (EditText) findViewById(R.id.passwordtext);

		TextView lblerror = (TextView) findViewById(R.id.lblerror);
		lblerror.setVisibility(View.INVISIBLE);

		Intent i = new Intent(getApplicationContext(), Main.class);
		startActivity(i);

	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		Login.httpclient = new DefaultHttpClient();
		StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
				.permitAll().build();
		StrictMode.setThreadPolicy(policy);
		super.onCreate(savedInstanceState);
		setContentView(R.layout.login);
	}
}